package com.cms.work.service.impl.transaction;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.cms.work.core.service.impl.BaseServiceImpl;
import com.cms.work.dao.transaction.IAssetDao;
import com.cms.work.entity.transaction.Asset;
import com.cms.work.service.transaction.IAssetService;

/**
 * @describe 会员资产
 * @author YY
 * @version v1.0
 * @date 2016-11-24 21:02:49
 **/
@Service
public class AssetServiceImpl extends BaseServiceImpl<Asset, Integer> implements IAssetService {
	
    @Autowired
    private IAssetDao assetDao;
	
	@Override
	public void save(Asset asset) {
	    if (asset.getId() == null || asset.getId() == 0) {
            assetDao.insertSelective(asset);
        } else {
            assetDao.updateByPrimaryKeySelective(asset);
        }
	}
}

